<style>
    table tr > th, table tr > td {
        text-align: center;
        vertical-align: middle !important;
    }
    table tr > td:first-child {
        text-align: left;
        word-break: break-all;
        word-wrap: break-word;
    }
    .examine-ignore {
        color: #c7c7c7;
    }
</style>
<form method="post" action="#">
    <div class="statistic-box bg-success m-bottom-md" style="margin: 0;padding: 5px;">
        <div class="statistic-title">
            {{ schoolName }} {{ targetTime }} 总得分
        </div>
        <div class="statistic-value">
            {{ finalScore }}
            {% if isLock %}
                <i class="fa fa-lock" style="font-size:20px"></i>
            {% else %}
                <i class="fa fa-unlock" style="font-size:20px"></i>
            {% endif %}
            <i style="font-size: 16px;">数据截止时间：{{ createTime }}</i>
            <i style="font-size: 14px;">数据问题请核对"应用使用情况(实时)"</i>
        </div>
        <div class="m-top-md" style="margin: 0;">
            {#比上个月 高/低 <span class="badge badge-danger bounceIn animation-delay1 active">x%</span>#}
            <i>勾选项目后不计入总分计算</i>
            <input type="submit" name="ignore" class="btn btn-info btn-sm" value="重新计算" style="margin-left: 15px;" />
        </div>
    </div>
    <div class="statistic-icon-background">
        <i class="ion-eye"></i>
    </div>

    <ul class="nav nav-tabs" role="tablist">
        {% for gradeName in grades %}
            <li role="presentation" {% if loop.first %}class="active"{% endif %}>
                <a href="#nav_{{ gradeName }}" aria-controls="nav_{{ gradeName }}" role="tab" data-toggle="tab">{{ gradeName }}
                    <span class="badge badge-success bounceIn animation-delay1 active">{{ gradeScore[gradeName] }}</span>
                </a>
            </li>
        {% endfor %}
    </ul>
    <div class="tab-content">
        {% for gradeName in grades %}
            <div role="tabpanel" class="tab-pane {% if loop.first %}active{% endif %}" id="nav_{{ gradeName }}">
                <div class="statistic-box bg-success m-bottom-md" style="margin: 0;padding: 5px;">
                    <div class="statistic-title">
                        {{ gradeName }} {{ gradeScore[gradeName] }}
                    </div>
                </div>

                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active">
                        <a href="#common_{{ gradeName }}" aria-controls="common_{{ gradeName }}" role="tab" data-toggle="tab">通用科目
                            <span class="badge badge-success bounceIn animation-delay1 active">{{ common['avgScore'][gradeName]['total'] }}</span>
                        </a>
                    </li>
                    {% for subject,brushObj in brush %}
                        <li role="presentation">
                            <a href="#brush_{{ subject }}_{{ gradeName }}" aria-controls="brush_{{ subject }}_{{ gradeName }}" role="tab" data-toggle="tab">{{ brushObj['name'] }}
                                <span class="badge badge-info bounceIn animation-delay2 active">{{ brushObj['avgScore'][gradeName]['total'] }}</span>
                            </a>
                        </li>
                    {% endfor %}
                    <li role="presentation">
                        <a href="#speak_train_{{ gradeName }}" aria-controls="speak_train_{{ gradeName }}" role="tab" data-toggle="tab">口语训练
                            <span class="badge badge-warning bounceIn animation-delay3 active">{{ speakTrain['avgScore'][gradeName]['total'] }}</span>
                        </a>
                    </li>
                    <li role="presentation">
                        <a href="#chinese_basic_{{ gradeName }}" aria-controls="chinese_basic_{{ gradeName }}" role="tab" data-toggle="tab">语文基础知识
                            <span class="badge badge-warning bounceIn animation-delay4 active">{{ chineseBasic['avgScore'][gradeName]['total'] }}</span>
                        </a>
                    </li>
                </ul>

                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="common_{{ gradeName }}">
                        <table class="table table-bordered">
                            <tr class="info">
                                <th colspan="3">考核项目</th>
                                <th colspan="21">云作业≤48分</th>
                                <th colspan="3">有效课堂≤10分</th>
                                <th rowspan="4">教师总得分</th>
                            </tr>
                            <tr class="info">
                                <th rowspan="3">
                                    老师/班级
                                    <br />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').prop('checked', true);" value="全选" />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').each(function(){$(this).prop('checked', !$(this).prop('checked'))});" value="反选" />
                                </th>
                                <th rowspan="3">班级数量</th>
                                <th rowspan="3">学生数量</th>

                                <th rowspan="2" colspan="6">基础项≤40分</th>

                                <th colspan="12">附加项(+20%)≤8分</th>

                                <th rowspan="3">基础得分</th>
                                <th rowspan="3">附加得分</th>
                                <th rowspan="3">总得分</th>

                                <th rowspan="3">标准次数</th>
                                <th rowspan="3">完成次数</th>
                                <th rowspan="3">得分</th>
                            </tr>
                            <tr class="info">
                                <th colspan="3">分层</th>
                                <th colspan="3">错题卷组</th>
                                <th colspan="3">微课</th>
                                <th colspan="3">二次批改</th>
                            </tr>
                            <tr class="info">
                                <th>标准次数</th>
                                <th>完成次数</th>
                                <th>平均题量</th>
                                <th>布置完成率</th>
                                <th>上交率</th>
                                <th>批改率</th>

                                <th>标准次数</th>
                                <th>完成次数</th>
                                <th>完成比例</th>

                                <th>标准次数</th>
                                <th>完成次数</th>
                                <th>完成比例</th>

                                <th>标准次数</th>
                                <th>录制次数</th>
                                <th>完成比例</th>

                                <th>标准次数</th>
                                <th>批改次数</th>
                                <th>完成比例</th>
                            </tr>
                            {% for info in common['rows'][gradeName] %}
                                <tr {% if info['ignore'] %}class="examine-ignore" {% endif %}>
                                    <td>
                                        <label>
                                            <input type="checkbox" name="ignore_common[]" value="{{ info['tchId'] }}" {% if info['ignore'] %}checked{% endif %} />
                                            {{ info['tchName'] }}
                                            <br />
                                            {{ info['classNames']|join(',') }}
                                        </label>
                                    </td>
                                    <td>{{ info['classNum'] }}</td>
                                    <td>{{ info['stuNum'] }}</td>

                                    <td>{{ common['standard']['cloudTask']['fix'] }}</td>
                                    <td>{{ info['cloudTask']['taskFixNum'] }}</td>
                                    <td>{{ info['cloudTask']['avgTopicNum'] }}</td>
                                    <td>{{ info['cloudTask']['completeFixRate'] * 100 }}%</td>
                                    <td>{{ info['cloudTask']['uploadRate'] * 100 }}%</td>
                                    <td>{{ info['cloudTask']['correctRate'] * 100 }}%</td>

                                    <td>{{ common['standard']['cloudTask']['group'] }}</td>
                                    <td>{{ info['cloudTask']['taskGroupNum'] }}</td>
                                    <td>{{ info['cloudTask']['completeGroupRate'] * 100 }}%</td>

                                    <td>{{ common['standard']['cloudTask']['wrong'] }}</td>
                                    <td>{{ info['cloudTask']['taskWrongNum'] }}</td>
                                    <td>{{ info['cloudTask']['completeWrongRate'] * 100 }}%</td>

                                    <td>{{ common['standard']['cloudTask']['courseware'] }}</td>
                                    <td>{{ info['cloudTask']['coursewareNum'] }}</td>
                                    <td>{{ info['cloudTask']['completeCoursewareRate'] * 100 }}%</td>

                                    <td>{{ common['standard']['cloudTask']['recorrect'] }}</td>
                                    <td>{{ info['cloudTask']['taskRecorrectNum'] }}</td>
                                    <td>{{ info['cloudTask']['completeRecorrectRate'] * 100 }}%</td>

                                    <td>{{ info['cloudTask']['scoreBase'] }}</td>
                                    <td>{{ info['cloudTask']['scoreExtra'] }}</td>
                                    <td>{{ info['cloudTask']['score'] }}</td>

                                    <td>{{ common['standard']['ztClass']['valid'] }}</td>
                                    <td>{{ info['ztClass']['taskValidNum'] }}</td>
                                    <td>{{ info['ztClass']['completeValidRate'] * 100 }}%</td>

                                    <td>{{ info['score'] }}</td>
                                </tr>
                            {% endfor %}
                            <tr class="success" style="font-weight: 600;">
                                <td colspan="3">项目平均分</td>
                                <td colspan="21">{{ common['avgScore'][gradeName]['cloudTask'] }}</td>
                                <td colspan="3">{{ common['avgScore'][gradeName]['ztClass'] }}</td>
                                <td>{{ common['avgScore'][gradeName]['total'] }}</td>
                            </tr>
                        </table>
                    </div>
                    {% for subject,brushObj in brush %}
                        <div role="tabpanel" class="tab-pane" id="brush_{{ subject }}_{{ gradeName }}">
                            <table class="table table-bordered">
                                <tr class="info">
                                    <th rowspan="2">
                                        班级
                                        <br />
                                        <input type="button" onclick="$(this).parents('table').find(':input[name]').prop('checked', true);" value="全选" />
                                        <input type="button" onclick="$(this).parents('table').find(':input[name]').each(function(){$(this).prop('checked', !$(this).prop('checked'))});" value="反选" />
                                    </th>
                                    <th rowspan="2">老师</th>
                                    <th colspan="3">基础项目</th>
                                    <th colspan="3">附加项目</th>
                                </tr>
                                <tr class="info">
                                    <th>自练要求</th>
                                    <th>完成量</th>
                                    <th>得分</th>

                                    <th>布置次数</th>
                                    <th>上交率</th>
                                    <th>得分</th>
                                </tr>
                                {% for info in brushObj['rows'][gradeName] %}
                                    <tr {% if info['ignore'] %}class="examine-ignore" {% endif %}>
                                        <td>
                                            <label>
                                                <input type="checkbox" name="ignore_{{ subject }}Brush[]" value="{{ info['classId'] }}" {% if info['ignore'] %}checked{% endif %} />
                                                {{ info['className'] }}
                                            </label>
                                        </td>
                                        <td>{{ info['tchName'] }}</td>

                                        <td>{{ brushObj['standard']['practice'] }}</td>
                                        <td>{{ info['practiceNum'] }}</td>
                                        <td>{{ info['scoreBase'] }}</td>

                                        <td>{{ info['taskFixNum'] }}</td>
                                        <td>{{ info['uploadRate'] * 100 }}%</td>
                                        <td>{{ info['scoreExtra'] }}</td>
                                    </tr>
                                {% endfor %}
                                <tr class="success">
                                    <td colspan="2">平均达标成绩</td>
                                    <td colspan="3">{{ brushObj['avgScore'][gradeName]['base'] }}</td>
                                    <td colspan="3">{{ brushObj['avgScore'][gradeName]['extra'] }}</td>
                                </tr>
                                <tr class="success">
                                    <td colspan="2">总得分</td>
                                    <td colspan="6">{{ brushObj['avgScore'][gradeName]['total'] }}</td>
                                </tr>
                            </table>
                        </div>
                    {% endfor %}
                    <div role="tabpanel" class="tab-pane" id="speak_train_{{ gradeName }}">
                        <table class="table table-bordered">
                            <tr class="info">
                                <th>
                                    班级
                                    <br />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').prop('checked', true);" value="全选" />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').each(function(){$(this).prop('checked', !$(this).prop('checked'))});" value="反选" />
                                </th>
                                <th>老师</th>
                                <th>要求布置</th>
                                <th>完成次数</th>
                                <th>得分</th>
                            </tr>
                            {% for info in speakTrain['rows'][gradeName] %}
                                <tr {% if info['ignore'] %}class="examine-ignore" {% endif %}>
                                    <td>
                                        <label>
                                            <input type="checkbox" name="ignore_speakTrain[]" value="{{ info['classId'] }}" {% if info['ignore'] %}checked{% endif %} />
                                            {{ info['className'] }}
                                        </label>
                                    </td>
                                    <td>{{ info['tchName'] }}</td>
                                    <td>{{ speakTrain['standard']['fix'] }}</td>
                                    <td>{{ info['taskFixNum'] }}</td>
                                    <td>{{ info['score'] }}</td>
                                </tr>
                            {% endfor %}
                            <tr class="success" style="font-weight: 600;">
                                <th colspan="2">项目得分</th>
                                <th colspan="3">{{ speakTrain['avgScore'][gradeName]['total'] }}</th>
                            </tr>
                        </table>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="chinese_basic_{{ gradeName }}">
                        <table class="table table-bordered">
                            <tr class="info">
                                <th>
                                    班级
                                    <br />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').prop('checked', true);" value="全选" />
                                    <input type="button" onclick="$(this).parents('table').find(':input[name]').each(function(){$(this).prop('checked', !$(this).prop('checked'))});" value="反选" />
                                </th>
                                <th>老师</th>
                                <th>要求布置</th>
                                <th>完成次数</th>
                                <th>得分</th>
                            </tr>
                            {% for info in chineseBasic['rows'][gradeName] %}
                                <tr {% if info['ignore'] %}class="examine-ignore" {% endif %}>
                                    <td>
                                        <label>
                                            <input type="checkbox" name="ignore_chineseBasic[]" value="{{ info['classId'] }}" {% if info['ignore'] %}checked{% endif %} />
                                            {{ info['className'] }}
                                        </label>
                                    </td>
                                    <td>{{ info['tchName'] }}</td>
                                    <td>{{ chineseBasic['standard']['fix'] }}</td>
                                    <td>{{ info['taskFixNum'] }}</td>
                                    <td>{{ info['score'] }}</td>
                                </tr>
                            {% endfor %}
                            <tr class="success" style="font-weight: 600;">
                                <th colspan="2">项目得分</th>
                                <th colspan="3">{{ chineseBasic['avgScore'][gradeName]['total'] }}</th>
                            </tr>
                        </table>
                    </div>
                </div>

            </div>
        {% endfor %}
    </div>


</form>